<template>
  <view class="container">
    <custom-nav></custom-nav>
    <view class="content">
      <view class="p-title">{{curData?.title}}</view>
      <view class="p-content">
        <rich-text :nodes="curData?.content"></rich-text>
      </view>
    </view>
  </view>
</template>

<script setup>
import useStore from "@/store";
const { register } = useStore();

const pageTitle = ref("");
const pageContent = ref("");
const pageType = ref("");

const curData = computed(() => {
  const t = pageType.value;
  const curConf = register.articleConf[t] || [];
  return curConf[0];
});

onLoad((options) => {
  register.getArticleConfig();
  pageType.value = options.type;
});
</script>

<style lang=scss scoped>
@import "@/styles/global.scss";
.content {
  padding: 20rpx;
  .p-title {
    padding: 20rpx 0 40rpx;
    text-align: center;
    font-size: 48rpx;
    color: #000;
    font-weight: 800;
  }

  .p-content {
    font-size: 24rpx;
    color: #333;
  }

  .p-strong {
    font-weight: bold;
    font-size: 32rpx;
  }
}
</style>